#pragma once
#include <iostream>
#include <string>
#include <cstring>
#include <cerrno>
#include <cassert>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#define NAME_PIPE "./mypipe.106"


bool createFifo(const std::string &path)
{
    int n = mkfifo(path.c_str(),0666);
    if(n==0)
    {
        return true;
    }else{
        std::cout<<"errno: "<<errno<<"err string "<<strerror(errno)<<std::endl;
        return false;
    }
}

bool removeFifo(const std::string& path)
{
    int n = unlink(path.c_str());
    assert(n==0);
    (void) n;
}
